import request from '@/request';

/**
 * 获取小程序推广码
 * @param {路径} path
 * @param {参数} params
 * @param {*} type 1 小程序码 2短链
 * @param {*} mode qrcode 二维码  link 生成连接
 * @returns
 */
export const getMiniAppQrcodeHook = async (path, params, type = 1, mode = 'qrcode') => {
    return await request('spreadQrcodeServ', { path, params, type, mode });
};

/* 获取店铺列表 */
export const getShopListHook = async () => {
    return await request('getShopList', { pageNum: 1, pageSize: 1000000 });
};

/* 应用启用/停用 */
export const applicationChangeStatus = async params => {
    return await request('applicationChangeStatus', params);
};
/* 打开erp使用说明 PDF */
export const openExplain = async () => {
    const { data } = await request('erpDoc');
    window.open(data.url);
};
